package com.LeeCode;

import java.util.ArrayList;
import java.util.List;

/**
 * 查找包含给定字符的单词
 */

public class Code2942 {
    public static void main(String[] args) {

    }

    public List<Integer> findWordsContaining(String[] words, char x) {
        List<Integer> res = new ArrayList<>();
        for(int i = 0; i < words.length; i++){
            for(int j = 0; j < words[i].length(); j++){
                if(words[i].charAt(j) == x){
                    res.add(i);
                    break;
                }
            }
        }
        return res;
    }
}
